1. Field of the Invention
The present invention relates to a data processor for performing data processing by a common microprogram for data having the same contents but having different bit lengths.
2. Description of the Prior Art
In data processors, particularly in microprocessor wherein computer instructions are executed by microprograms, it often occurs that data having different bit lengths are designated by mechanical language instructions from a user, i.e., user instructions should be processed.
In the conventional art for processing such a data, microprograms for executing the user instructions are designated by the reading-out of the data designated by user instructions and predetermined fields of inner (or internal) instructions obtained as a result of decoding the user instructions are designated by microinstructions and then are carried out. In addition, bit lengths of data thus read-out, which should be calculated or processed are directly designated by the predetermined fields of microinstructions.
For instance, user instruction which functions so "each lower eight bits of 32-bit general purpose registers A and B are to be added to each other and the result stored in the lower eight bit positions" is executed as follows; the lower eight-bit data of the general purpose registers A and B are applied to data buses indirectly designated by both source register (SR) and destination register (DR) for the inner instruction through microinstructions and data thus applied to the buses, which is to be applied to an arithmetic and logical unit is now transferred to registers. Then, the bit lengths to be processed, and the arithmetic operation unit in question as well, are directly designated by the OP field of a microinstruction and the result an operation is stored into lower eight-bit positions of the register B indirectly designated by the DR field of the inner instructions through a microprocessor.
Accordingly, different microprograms become necessary for each of the different data lengths to be processed even when an instruction is a user instruction for processing the same data operations. For instance, when a 32-bit microprocessor is used, each of microprograms is necessary in order to process data having 8-bit length, 16-bit length, and 32-bit length, respectively. As result, different microprograms must be prepared for processing data having different bit lengths. This, in turn, results in an increase of the memory capacity for storing different microprograms, thereby bringing about an increase in the access times of the microprograms as well as lowering the processing efficiencies of the microprocessor.